# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=msfdb
pkgver=16.09c603b
pkgrel=1
groups=('blackarch' 'blackarch-misc')
pkgdesc='Manage the metasploit framework database.'
arch=('any')
url='https://github.com/BlackArch/msfdb'
license=('custom:unknown')
depends=('metasploit' 'postgresql' 'postgresql-libs' 'openssl' 'lsof' 'sed')
makedepends=('git')
source=("git+https://github.com/BlackArch/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname-blackarch"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 bash-completion/$pkgname \
    "$pkgdir/usr/share/bash-completion/completions/$pkgname"
}

